package com.ruoyi.common.core.constant;

import java.math.BigDecimal;

/**
 * 通用常量信息
 * 
 * @author ruoyi
 */
public class Constants
{
    /**
     *  开奖状态（false.待开奖 true.已开奖）
     */
    public static final String LOTTERY_STATUS="lottery_status";
    /**
     * 中奖状态 （false.未中奖 true.已中奖）
     */
    public static final String WINNING_STATUS="winning_status";
    /**
     * 处理状态，扣款 （false.待处理 true.已处理）
     */
    public static final String PROCESSING_STATUS="processing_status";
    /**
     * 已处理
     */
    public static final Integer PROCESSED=1;
    /**
     * 待处理
     */
    public static final Integer PENDING=0;
    /**
     * 默认每页行数
     */
    public static final Integer SIZE=5000;
    /**
     * 批量处理行数
     */
    public static final Integer FIRST=1000;
    /**
     * 累计800FTC小释放红包（拼团基金）
     */
    public static final Integer GroupPrice=800;
    /**
     * UTF-8 字符集
     */
    public static final String UTF8 = "UTF-8";

    /**
     * GBK 字符集
     */
    public static final String GBK = "GBK";

    /**
     * RMI 远程方法调用
     */
    public static final String LOOKUP_RMI = "rmi:";

    /**
     * LDAP 远程方法调用
     */
    public static final String LOOKUP_LDAP = "ldap:";

    /**
     * LDAPS 远程方法调用
     */
    public static final String LOOKUP_LDAPS = "ldaps:";

    /**
     * http请求
     */
    public static final String HTTP = "http://";

    /**
     * https请求
     */
    public static final String HTTPS = "https://";
    /**
     * 注册赠送上级直推人PC阈值
     */
    public static final BigDecimal REGISTER_PRICE = new BigDecimal(1500);

    /**
     * 成功标记
     */
    public static final Integer SUCCESS = 200;

    /**
     * 失败标记
     */
    public static final Integer FAIL = 500;

    /**
     * token过期
     */
    public static final Integer Expired = 400;

    public static final BigDecimal bili=new BigDecimal(0.725);

    /**
     * 登录成功状态
     */
    public static final String LOGIN_SUCCESS_STATUS = "0";

    /**
     * 登录失败状态
     */
    public static final String LOGIN_FAIL_STATUS = "1";
    /**
     * 其他
     */
    public static final String ORTHER = "2";
    /**
     * 计数3
     */
    public static final String THREE = "3";
    /**
     * 计数4
     */
    public static final String FOUR = "4";
    /**
     * 经理的考核周期
     */
    public static final Integer Manager=30;
    /**
     * 总监的考核周期
     */
    public static final Integer Director=6*30;
    /**
     * 订购奖励
     */
    public static final String GROUP_PRICE = "groupPrice";
    /**
     * 登录成功
     */
    public static final String LOGIN_SUCCESS = "Success";

    /**
     * 注销
     */
    public static final String LOGOUT = "Logout";

    /**
     * 注册
     */
    public static final String REGISTER = "Register";

    /**
     * 登录失败
     */
    public static final String LOGIN_FAIL = "Error";

    /**
     * 当前记录起始索引
     */
    public static final String PAGE_NUM = "pageNum";

    /**
     * 每页显示记录数
     */
    public static final String PAGE_SIZE = "pageSize";

    /**
     * 排序列
     */
    public static final String ORDER_BY_COLUMN = "orderByColumn";

    /**
     * 排序的方向 "desc" 或者 "asc".
     */
    public static final String IS_ASC = "isAsc";

    /**
     * 验证码 redis key
     */
    public static final String CAPTCHA_CODE_KEY = "captcha_codes:";
    /**
     * 个人码前缀
     */
    public static final String PERSONAL_CODE="SJ";
    /**
     * 商家码前缀
     */
    public static final String SHOP_CODE="SP";

    /**
     * 验证码有效期（分钟）
     */
    public static final long CAPTCHA_EXPIRATION = 2;


    /**
     * 参数管理 cache key
     */
    public static final String SYS_CONFIG_KEY = "sys_config:";

    /**
     * 字典管理 cache key
     */
    public static final String SYS_DICT_KEY = "sys_dict:";

    public static final String MQCMD="MQCMD";
    /**
     * 资源映射路径 前缀
     */
    public static final String RESOURCE_PREFIX = "/profile";

    /**
     * MQ主题模式
     */
    public static final String TASK_TOPIC="TASK_TOPIC";

    /**
     * MQ队列模式
     */
    public static final String TASK_QUEUE="TASK_QUEUE";
    /**
     * JOB服务中的mq队列
     */
    public static final String JOB_QUEUE="JOB_QUEUE";
    /**
     * 定时任务白名单配置（仅允许访问的包名，如其他需要可以自行添加）
     */
    public static final String[] JOB_WHITELIST_STR = { "com.ruoyi" };

    /**
     * 定时任务违规的字符
     */
    public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
            "org.springframework", "org.apache", "com.ruoyi.common.core.utils.file" };
    /**
     * proto请求协议
     */
    public static final int PACT=0x01;
    /**
     * 茶票兑换VC比例
     */
    public static final int PRICE_VC=7;
    /**
     * 正式经理申请满额标准
     */
    public static final long FORMAL_MANAGER_APPLY = 100;
    /**
     * 正式总监申请满额标准
     */
    public static final long FORMAL_DIRECTOR_APPLY = 600;
    /**
     * 预备总监申请满额标准
     */
    public static final long RESERVE_DIRECTOR_APPLY = 150;
    /**
     * 预备总监申请满额标准(小部门)
     */
    public static final long RESERVE_DIRECTOR_APPLY_DEPT = 35;
    /**
     * 操作密码
     */
    public static final String ADMIN_PASS = "sjmc2022";

    /**
     * 审核状态
     */
    public static enum Status{
        PENDING_REVIEW(1L,"待审核"),
        AUDIT_SUCCESS(2L,"审核通过"),
        AUDIT_FAILURE(3L,"审核未通过,{0}"),
        PAID(4L,"已打款"),
        ;
        Status(Long code,String msg){
            this.code=code;
            this.msg=msg;
        }
        public Long getCode() {
            return code;
        }

        public void setCode(Long code) {
            this.code = code;
        }

        public String getMsg() {
            return msg;
        }

        public void setMsg(String msg) {
            this.msg = msg;
        }

        private Long code;
        private String msg;
    }
    /**
     * 审核状态
     */
    public static enum WinningStatus{
        //0：下架 1：上架 2：待开奖 3：未中奖 4：已开奖
        TAKE_DOWN(0,"下架"),
        LISTED(1,"上架"),
        PENDING_DRAW(2,"待开奖"),
        DID_NOT_WIN(3,"未中奖"),
        HAS_WON(4,"已中奖"),
        ;
        WinningStatus(Integer code,String msg){
            this.code=code;
            this.msg=msg;
        }
        public Integer getCode() {
            return code;
        }

        public void setCode(Integer code) {
            this.code = code;
        }

        public String getMsg() {
            return msg;
        }

        public void setMsg(String msg) {
            this.msg = msg;
        }

        private Integer code;
        private String msg;
    }
    /**
     * 账户类型
     */
    public static enum AccountType{
        Balance(1L,"茶票明细"),
        VC(2L,"VC明细"),
        AUDIT_FAILURE(3L,"总产值明细"),
        gross_output(4L,"FTC小钱包明细"),
        FTC_MAX(5L,"FTC大钱包明细 "),
        PC(6L,"PC明细"),
        group(7L,"拼团基金(待释放)"),
        online_coupon(8L,"线上产品券明细"),
        offline_coupon(9L,"线下产品券明细"),
        Reserve_assets(10L,"预留资产明细"),
        Active_assets(11L,"活动资产明细"),
        //group_released(12L,"拼团基金(已释放)"),
        //total_recharge(13L,"总充值"),
        //total_withdrawal(14L,"总提现"),
        ;
        AccountType(Long code,String msg){
            this.code=code;
            this.msg=msg;
        }
        public Long getCode() {
            return code;
        }

        public void setCode(Long code) {
            this.code = code;
        }

        public String getMsg() {
            return msg;
        }

        public void setMsg(String msg) {
            this.msg = msg;
        }

        private Long code;
        private String msg;
    }

    public enum AmountType {
        PRICE(1, "余额"),
        VC(2, "VC"),
        PC(3, "PC"),
        SFTC(4, "FTC小钱包"),
        FTC(5, "FTC"),
        OUTPUT_VALUE(6, "总产值"),
        GROUP_PRICE(7, "拼团基金"),
        IN_ONLINE_PRICE(8, "线上券"),
        IN_OFFLINE_PRICE(9, "线下券"),
        KEEP_PRICE(10, "预留资产"),
        PROMOTE_PRICE(11, "活动资产"),
        ;

        private Integer code;
        private String msg;

        AmountType(Integer code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public Integer getCode() {
            return code;
        }

        public void setCode(Integer code) {
            this.code = code;
        }

        public String getMsg() {
            return msg;
        }

        public void setMsg(String msg) {
            this.msg = msg;
        }
    }
}
